package 重温_Java并发基础.volatile原语;

/**
 * @Author idea
 * @Date created in 4:16 下午 2020/8/9
 */
public class LazySingleton {
    private static volatile LazySingleton instance = null;

    public static LazySingleton getInstance() {
        if (instance == null) {
            instance = new LazySingleton();
        }

        return instance;
    }

}